<?php
$limit = count($common);
if ($limit>0){
?>
<table>
<?php 
	for ($i=0;$i<$limit;$i=$i+5){
		echo "<tr>";
			if (isset($common[$i]['cat_id'])){
				echo "<td>";
					echo $common[$i]['cat_name']."<br>";
					echo '<img src="'.base_url().'public/images/'.$common[$i]['images'].'" class="statusicon" width="150" height="90">';
					echo '<br>'.anchor(base_url().'addmincont/editProductM/'.$common[$i]['cat_id'],'Edit').'&nbsp;&nbsp;&nbsp;&nbsp;';
					echo anchor(base_url().'addmincont/delProductM/'.$common[$i]['cat_id'],'Delete');
				echo "</td>";
			}else echo "<td></td>";
			if (isset($common[$i+1]['cat_id'])){
				echo "<td>";
					echo $common[$i+1]['cat_name']."<br>";
					echo '<img src="'.base_url().'public/images/'.$common[$i+1]['images'].'" class="statusicon" width="150" height="90">';
					echo '<br>'.anchor(base_url().'addmincont/editProductM/'.$common[$i+1]['cat_id'],'Edit').'&nbsp;&nbsp;&nbsp;&nbsp;';
					echo anchor(base_url().'addmincont/delProductM/'.$common[$i+1]['cat_id'],'Delete');
				echo "</td>";
			}else echo "<td></td>";
			if (isset($common[$i+2]['cat_id'])){
				echo "<td>";
					echo $common[$i+2]['cat_name']."<br>";
					echo '<img src="'.base_url().'public/images/'.$common[$i+2]['images'].'" class="statusicon" width="150" height="90">';
					echo '<br>'.anchor(base_url().'addmincont/editProductM/'.$common[$i+2]['cat_id'],'Edit').'&nbsp;&nbsp;&nbsp;&nbsp;';
					echo anchor(base_url().'addmincont/delProductM/'.$common[$i+2]['cat_id'],'Delete');
				echo "</td>";
			}else echo "<td></td>";
			if (isset($common[$i+3]['cat_id'])){
				echo "<td>";
					echo $common[$i+3]['cat_name']."<br>";
					echo '<img src="'.base_url().'public/images/'.$common[$i+3]['images'].'" class="statusicon" width="150" height="90">';
					echo '<br>'.anchor(base_url().'addmincont/editProductM/'.$common[$i+3]['cat_id'],'Edit').'&nbsp;&nbsp;&nbsp;&nbsp;';
					echo anchor(base_url().'addmincont/delProductM/'.$common[$i+3]['cat_id'],'Delete');
				echo "</td>";
			}else echo "<td></td>";
			if (isset($common[$i+4]['cat_id'])){
				echo "<td>";
					echo $common[$i+4]['cat_name']."<br>";
					echo '<img src="'.base_url().'public/images/'.$common[$i+4]['images'].'" class="statusicon" width="150" height="90">';
					echo '<br>'.anchor(base_url().'addmincont/editProductM/'.$common[$i+4]['cat_id'],'Edit').'&nbsp;&nbsp;&nbsp;&nbsp;';
					echo anchor(base_url().'addmincont/delProductM/'.$common[$i+4]['cat_id'],'Delete');
				echo "</td>";
			}else echo "<td></td>";
		echo "</tr>";
	}
?>
	<tr>
		<td colspan="5">
			<?php 
//				echo "<input type='hidden' value='".$condition['cat_name']."' name='namep' id ='namep'/>";
//				echo "<input type='hidden' value='".$condition['cat_color']."' name='colorp' id ='colorp'/>";
//				echo "<input type='hidden' value='".$condition['cat_type_sub_id']."' name='typep' id ='typep'/>";
				echo $this->pagination->create_links(); 
			?>
		</td>
	</tr>
</table>
<?php 
}else echo '<h1>Emty Data</h1>';
?>